<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改')" />
</head>
<body class="white-bg" th:object="${payTransRsp}">
	<!--请求报文-->
    <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
		<div class="form-group">
			<label class="col-sm-1 control-label" style="font-size: 20px">请求报文：</label>
			<div class="col-sm-10">
				<textarea th:field="*{req}" type="text" name="" class="form-control"  style="margin: 0px 19.2344px 0px 0px; width: 90%; height: 100px;"></textarea>
			</div>
		</div>
    </div>
	<!--返回报文-->
	<div class="wrapper wrapper-content animated fadeInRight ibox-content" >
		<div class="form-group">
			<label class="col-sm-1 control-label" style="font-size: 20px">返回报文：</label>
			<div class="col-sm-10">
				<textarea th:field="*{rsp}" type="text" name="" class="form-control"  style="margin: 0px 19.2344px 0px 0px; width: 90%; height: 100px;"></textarea>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<!--请求失败 提示框-->
	<div id="reqFalse" class="alert alert-danger" style="margin-top: 5%; width: 82%; height: 25%;display: none">
		<span id="reqFalseContent" style="font-size: 32px"></span>
	</div>
	<!--支付页面-->
	<iframe id="payContent" scrolling="auto" width="100%" height="80%"></iframe>
    <script th:inline="javascript">
        var payTransRsp = [[${payTransRsp}]];
        var withdrawalRsp = [[${withdrawalRsp}]];
        console.info(withdrawalRsp.code);
        if (withdrawalRsp.code == "success"){
            var payUrl = payTransRsp.qrCodeUrl;
            // 打开支付页面
            $("#payContent").attr("src", payUrl);
		}else {
            $("#reqFalse").css({'display':'block'});
            document.getElementById("reqFalseContent").innerText = withdrawalRsp.msg + "！";
		}
	</script>
</body>
</html>
